<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div id="info"></div>
  <script type="text/javascript">
    // 模板字符串---ES6新特性
    
    var userInfo = {
      uname: 'zhangsan',
      age: 13,
      gender: 'female'
    }

    // var userTag = '<ul><li>用户名' + userInfo.uname + '</li><li>年龄' + userInfo.age + '</li><li>性别' + userInfo.gender + '</li></ul>'
    var userTag = `
      <ul>
        <li>${userInfo.uname}</li>
        <li>${userInfo.age}</li>
        <li>${userInfo.gender}</li>
      </ul>
    `
    var div = document.getElementById('info')
    div.innerHTML = userTag

  </script>
</body>
</html>